package com.sinven.controller;

import com.sinven.common.ApiResult;
import com.sinven.pojo.User;
import com.sinven.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
@RequestMapping("/user")
@Controller

public class UserController {
   @Autowired
   private UserService userService;
   @GetMapping("/selectbynum")
   @ResponseBody
   public ApiResult<User> selectByNum(String num){

      return userService.selectByNum(num);
   }
}
